3.3056 \(\int (a+b x)^{-n} (c+d x) (e+f x)^{-3+n} \, dx\)

Optimal. Leaf size=125 \[ -\frac{(a+b x)^{1-n} (d e-c f) (e+f x)^{n-2}}{f (2-n) (b e-a f)}-\frac{(a+b x)^{1-n} (e+f x)^{n-1} (a d f (2-n)-b (c f+d (e-e n)))}{f (1-n) (2-n) (b e-a f)^2} \]

[Out]

-(((d*e - c*f)*(a + b*x)^(1 - n)*(e + f*x)^(-2 + n))/(f*(b*e - a*f)*(2 - n))) - ((a*d*f*(2 - n) - b*(c*f + d*(
e - e*n)))*(a + b*x)^(1 - n)*(e + f*x)^(-1 + n))/(f*(b*e - a*f)^2*(1 - n)*(2 - n))

________________________________________________________________________________________

Rubi [A]  time = 0.063886, antiderivative size = 123, normalized size of antiderivative = 0.98, number of steps used = 2, number of rules used = 2, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {79, 37} \[ \frac{(a+b x)^{1-n} (e+f x)^{n-1} (-a d f (2-n)+b c f+b d (e-e n))}{f (1-n) (2-n) (b e-a f)^2}-\frac{(a+b x)^{1-n} (d e-c f) (e+f x)^{n-2}}{f (2-n) (b e-a f)} \]

Antiderivative was successfully verified.

[In]

Int[((c + d*x)*(e + f*x)^(-3 + n))/(a + b*x)^n,x]

[Out]

-(((d*e - c*f)*(a + b*x)^(1 - n)*(e + f*x)^(-2 + n))/(f*(b*e - a*f)*(2 - n))) + ((b*c*f - a*d*f*(2 - n) + b*d*
(e - e*n))*(a + b*x)^(1 - n)*(e + f*x)^(-1 + n))/(f*(b*e - a*f)^2*(1 - n)*(2 - n))

Rule 79

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> -Simp[((b*e - a*f
)*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/(f*(p + 1)*(c*f - d*e)), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1)
+ c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^Simplify[p + 1], x], x] /; FreeQ[{a, b, c,
d, e, f, n, p}, x] &&  !RationalQ[p] && SumSimplerQ[p, 1]

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^(n +
1))/((b*c - a*d)*(m + 1)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rubi steps

\begin{align*} \int (a+b x)^{-n} (c+d x) (e+f x)^{-3+n} \, dx &=-\frac{(d e-c f) (a+b x)^{1-n} (e+f x)^{-2+n}}{f (b e-a f) (2-n)}-\frac{(-b c f-d (b e (1-n)+a f (-2+n))) \int (a+b x)^{-n} (e+f x)^{-2+n} \, dx}{f (-b e+a f) (-2+n)}\\ &=-\frac{(d e-c f) (a+b x)^{1-n} (e+f x)^{-2+n}}{f (b e-a f) (2-n)}+\frac{(b c f-a d f (2-n)+b d (e-e n)) (a+b x)^{1-n} (e+f x)^{-1+n}}{f (b e-a f)^2 (1-n) (2-n)}\\ \end{align*}

Mathematica [A]  time = 0.074208, size = 84, normalized size = 0.67 \[ \frac{(a+b x)^{1-n} (e+f x)^{n-2} (a c f (n-1)-a d e+a d f (n-2) x+b c (f x-e (n-2))-b d e (n-1) x)}{(n-2) (n-1) (b e-a f)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[((c + d*x)*(e + f*x)^(-3 + n))/(a + b*x)^n,x]

[Out]

((a + b*x)^(1 - n)*(e + f*x)^(-2 + n)*(-(a*d*e) + a*c*f*(-1 + n) + a*d*f*(-2 + n)*x - b*d*e*(-1 + n)*x + b*c*(
-(e*(-2 + n)) + f*x)))/((b*e - a*f)^2*(-2 + n)*(-1 + n))

________________________________________________________________________________________

Maple [A]  time = 0.004, size = 160, normalized size = 1.3 \begin{align*}{\frac{ \left ( bx+a \right ) \left ( fx+e \right ) ^{-2+n} \left ( adfnx-bdenx+acfn-2\,adfx-bcen+bcfx+bdex-acf-ade+2\,bce \right ) }{ \left ({a}^{2}{f}^{2}{n}^{2}-2\,abef{n}^{2}+{b}^{2}{e}^{2}{n}^{2}-3\,{a}^{2}{f}^{2}n+6\,abefn-3\,{b}^{2}{e}^{2}n+2\,{a}^{2}{f}^{2}-4\,abef+2\,{b}^{2}{e}^{2} \right ) \left ( bx+a \right ) ^{n}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*(f*x+e)^(-3+n)/((b*x+a)^n),x)

[Out]

(b*x+a)*(f*x+e)^(-2+n)*(a*d*f*n*x-b*d*e*n*x+a*c*f*n-2*a*d*f*x-b*c*e*n+b*c*f*x+b*d*e*x-a*c*f-a*d*e+2*b*c*e)/(a^
2*f^2*n^2-2*a*b*e*f*n^2+b^2*e^2*n^2-3*a^2*f^2*n+6*a*b*e*f*n-3*b^2*e^2*n+2*a^2*f^2-4*a*b*e*f+2*b^2*e^2)/((b*x+a
)^n)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (d x + c\right )}{\left (f x + e\right )}^{n - 3}}{{\left (b x + a\right )}^{n}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(f*x+e)^(-3+n)/((b*x+a)^n),x, algorithm="maxima")

[Out]

integrate((d*x + c)*(f*x + e)^(n - 3)/(b*x + a)^n, x)

________________________________________________________________________________________

Fricas [B]  time = 1.63008, size = 667, normalized size = 5.34 \begin{align*} -\frac{{\left (a^{2} c e f -{\left (b^{2} d e f +{\left (b^{2} c - 2 \, a b d\right )} f^{2} -{\left (b^{2} d e f - a b d f^{2}\right )} n\right )} x^{3} -{\left (2 \, a b c - a^{2} d\right )} e^{2} -{\left (b^{2} d e^{2} - 2 \, a^{2} d f^{2} +{\left (3 \, b^{2} c - 2 \, a b d\right )} e f -{\left (b^{2} d e^{2} + b^{2} c e f -{\left (a b c + a^{2} d\right )} f^{2}\right )} n\right )} x^{2} +{\left (a b c e^{2} - a^{2} c e f\right )} n -{\left (2 \, b^{2} c e^{2} - a^{2} c f^{2} +{\left (2 \, a b c - 3 \, a^{2} d\right )} e f +{\left (a^{2} d e f + a^{2} c f^{2} -{\left (b^{2} c + a b d\right )} e^{2}\right )} n\right )} x\right )}{\left (f x + e\right )}^{n - 3}}{{\left (2 \, b^{2} e^{2} - 4 \, a b e f + 2 \, a^{2} f^{2} +{\left (b^{2} e^{2} - 2 \, a b e f + a^{2} f^{2}\right )} n^{2} - 3 \,{\left (b^{2} e^{2} - 2 \, a b e f + a^{2} f^{2}\right )} n\right )}{\left (b x + a\right )}^{n}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(f*x+e)^(-3+n)/((b*x+a)^n),x, algorithm="fricas")

[Out]

-(a^2*c*e*f - (b^2*d*e*f + (b^2*c - 2*a*b*d)*f^2 - (b^2*d*e*f - a*b*d*f^2)*n)*x^3 - (2*a*b*c - a^2*d)*e^2 - (b
^2*d*e^2 - 2*a^2*d*f^2 + (3*b^2*c - 2*a*b*d)*e*f - (b^2*d*e^2 + b^2*c*e*f - (a*b*c + a^2*d)*f^2)*n)*x^2 + (a*b
*c*e^2 - a^2*c*e*f)*n - (2*b^2*c*e^2 - a^2*c*f^2 + (2*a*b*c - 3*a^2*d)*e*f + (a^2*d*e*f + a^2*c*f^2 - (b^2*c +
 a*b*d)*e^2)*n)*x)*(f*x + e)^(n - 3)/((2*b^2*e^2 - 4*a*b*e*f + 2*a^2*f^2 + (b^2*e^2 - 2*a*b*e*f + a^2*f^2)*n^2
 - 3*(b^2*e^2 - 2*a*b*e*f + a^2*f^2)*n)*(b*x + a)^n)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(f*x+e)**(-3+n)/((b*x+a)**n),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 2.39759, size = 1465, normalized size = 11.72 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(f*x+e)^(-3+n)/((b*x+a)^n),x, algorithm="giac")

[Out]

(a*b*d*f^2*n*x^3*e^(n*log(f*x + e) - 3*log(f*x + e))/(b*x + a)^n - b^2*d*f*n*x^3*e^(n*log(f*x + e) - 3*log(f*x
 + e) + 1)/(b*x + a)^n + a*b*c*f^2*n*x^2*e^(n*log(f*x + e) - 3*log(f*x + e))/(b*x + a)^n + a^2*d*f^2*n*x^2*e^(
n*log(f*x + e) - 3*log(f*x + e))/(b*x + a)^n + b^2*c*f^2*x^3*e^(n*log(f*x + e) - 3*log(f*x + e))/(b*x + a)^n -
 2*a*b*d*f^2*x^3*e^(n*log(f*x + e) - 3*log(f*x + e))/(b*x + a)^n - b^2*c*f*n*x^2*e^(n*log(f*x + e) - 3*log(f*x
 + e) + 1)/(b*x + a)^n + b^2*d*f*x^3*e^(n*log(f*x + e) - 3*log(f*x + e) + 1)/(b*x + a)^n + a^2*c*f^2*n*x*e^(n*
log(f*x + e) - 3*log(f*x + e))/(b*x + a)^n - 2*a^2*d*f^2*x^2*e^(n*log(f*x + e) - 3*log(f*x + e))/(b*x + a)^n -
 b^2*d*n*x^2*e^(n*log(f*x + e) - 3*log(f*x + e) + 2)/(b*x + a)^n + a^2*d*f*n*x*e^(n*log(f*x + e) - 3*log(f*x +
 e) + 1)/(b*x + a)^n + 3*b^2*c*f*x^2*e^(n*log(f*x + e) - 3*log(f*x + e) + 1)/(b*x + a)^n - 2*a*b*d*f*x^2*e^(n*
log(f*x + e) - 3*log(f*x + e) + 1)/(b*x + a)^n - a^2*c*f^2*x*e^(n*log(f*x + e) - 3*log(f*x + e))/(b*x + a)^n -
 b^2*c*n*x*e^(n*log(f*x + e) - 3*log(f*x + e) + 2)/(b*x + a)^n - a*b*d*n*x*e^(n*log(f*x + e) - 3*log(f*x + e)
+ 2)/(b*x + a)^n + b^2*d*x^2*e^(n*log(f*x + e) - 3*log(f*x + e) + 2)/(b*x + a)^n + a^2*c*f*n*e^(n*log(f*x + e)
 - 3*log(f*x + e) + 1)/(b*x + a)^n + 2*a*b*c*f*x*e^(n*log(f*x + e) - 3*log(f*x + e) + 1)/(b*x + a)^n - 3*a^2*d
*f*x*e^(n*log(f*x + e) - 3*log(f*x + e) + 1)/(b*x + a)^n - a*b*c*n*e^(n*log(f*x + e) - 3*log(f*x + e) + 2)/(b*
x + a)^n + 2*b^2*c*x*e^(n*log(f*x + e) - 3*log(f*x + e) + 2)/(b*x + a)^n - a^2*c*f*e^(n*log(f*x + e) - 3*log(f
*x + e) + 1)/(b*x + a)^n + 2*a*b*c*e^(n*log(f*x + e) - 3*log(f*x + e) + 2)/(b*x + a)^n - a^2*d*e^(n*log(f*x +
e) - 3*log(f*x + e) + 2)/(b*x + a)^n)/(a^2*f^2*n^2 - 2*a*b*f*n^2*e - 3*a^2*f^2*n + b^2*n^2*e^2 + 6*a*b*f*n*e +
 2*a^2*f^2 - 3*b^2*n*e^2 - 4*a*b*f*e + 2*b^2*e^2)